import Vue from 'vue';
import Router from 'vue-router';
import App from '../App.vue';
import Index from '../views/Index.vue';
import Invite from '../views/Invite.vue'; // 引入大V邀请页面组件

Vue.use(Router); // 注册路由插件

const routes = [
  {
    path: '/',
    component: App,
    children: [
      { path: '', redirect: '/index' },
      { path: '/index', component: Index, meta: { title: '职问问' } },
      { path: '/invite', component: Invite, meta: { title: '职问问' } }, // 添加大V邀请页面路由
    ],
  },
];

const router = new Router({
  mode: 'history', // 使用 history 模式
  base: process.env.BASE_URL, // 基础路径
  routes,
});

export default router;
